//
//  ViewController.m
//  NewFeatureGuid
//
//  Created by gome on 2018/12/12.
//  Copyright © 2018 gome. All rights reserved.
//

#import "ViewController.h"
#import "NewGuidManager.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet UIView *redView;
@property (weak, nonatomic) IBOutlet UIView *yellowView;
@property (weak, nonatomic) IBOutlet UIView *blackView;
@property (weak, nonatomic) IBOutlet UIView *blueView;
@property (weak, nonatomic) IBOutlet UIView *grayView;
@property (weak, nonatomic) IBOutlet UIView *greenView;

@end

@implementation ViewController

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
        
    NSArray *views = @[_greenView,_grayView, _blueView, _blackView, _yellowView, _redView];
    NSMutableArray *arr = [NSMutableArray array];

    for (UIView *view in views) {
        CGRect rect = [NewGuidManager convertRectFromWindow:view];
        
        NSString *rectString = NSStringFromCGRect(rect);
        NSMutableDictionary *mdict = [NSMutableDictionary dictionary];
        [mdict setObject:rectString forKey:@"maskViewRect"];
        [mdict setObject:@"tipsImageName" forKey:@"tipsImageName"];
        [mdict setObject:@"up" forKey:@"direction"];
        
        [arr addObject:mdict];
    }
    
    [[NewGuidManager sharedInstence] showWithTipsArray:arr];
}

- (void)viewDidLoad {
    [super viewDidLoad];
}
@end
